-
-
Notifications
You must be signed in to change notification settings - Fork 72
Update and cleanup the Xyz procedure #1130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0d5ba9c to
8c22c61
Compare
It was used when the xyz had an extra filter function on its materials while parsing EFFECT_SPELL_XYZ_MAT, being it a random generic token with properties this check is redoundant and most of the times it won't work, as if a card has a filter then it requires specific properties from the monster, now EFFECT_SPELL_XYZ_MAT will only be applied if the xyz has no filter function
Remove repeated checks for GetCardEffect, also properly short circuit the recursive function if a valid material set is found
Add more early returns and avoid extra recursions
Use the same function to check for a valid summonable xyz
The value for now is set to '99', but will be updated to an unique token value in future
If a must material group is passed to the xyz proc, and the min and max values match the size of that group, then if those materials are valid within the material group, the selection will be skipped
Use the parameters according to the new way required by the xyz proc
Halfway to Forever Gazer Shark Galaxy Tyranno Geargia Change Artifacts Unleashed Advanced Heraldry Art Shining Hope Road Destiny overlay Dimension Xyz The Phantom Knights' Twin Medals D/D/D Xyz Salamangreat Zebroid X (Anime)
…T_DOUBLE_XYZ_MATERIAL
…FFECT_DOUBLE_XYZ_MATERIAL were selected
8c22c61 to
2cc7194
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Do a major cleanup of the xyz procedure removing various redoundancies and trying to make the code less convoluted.
All the various effects affecting the xyz procedure have been assigned a proper constant to make them more easily usable by other cards
The behaviour for the "automatic material selection" has been also changed to make it less bug prone, now if
must_useis provided toDuel.XyzSummonand ifmincandmaxcboth correspond to the size of themust_usegroup, then no user selection will be performed (Advanced Heraldry Art, Shining Hope Road, etc.). This changes the current behaviour, so that if onlymgis provided toDuel.XyzSummon, the player will still be able to select the cards, making so cards that summon using a specific material pool (Galaxy Tyranno, Goblin Biker Grand Stampede, etc.) no longer have to passmaxcandmincto not break things. Cards got updated accordingly.Another minor thing that got changed, is the addition of the new "constant"
Xyz.InfiniteMats, to be used inXyz.AddProcedureinstead of passing the magic value99, to abstract away the logic from the user. (In future it will then be declared as a sentinel value making people no longer able to pass99to indicate infinite materials.)